const fs = require('fs')
const Fn = require('./fn.js')

global.Cron = {
  run() {
    const nt = Acan.time()
    setTimeout(Cron.run, 1000)
    Cron.list.map(o => {
      if (nt % o.ttl === 0 && o.fn) { o.fn() }
    })
  },
  list: []
}

Cron.run()
